package com.wanmao.test.dbhelper;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;


public class DBOpenHelper extends SQLiteOpenHelper {
    public DBOpenHelper(Context context) {
        super(context, "wanmao.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        //巡视记录
        db.execSQL("CREATE TABLE RYRW_TABLE(" +
                "OBJ_ID varchar(255) primary key," +
                "RYID varchar(255) null," +
                "RWID varchar(255) null)");
        db.execSQL("CREATE TABLE T_ZH_JSJD_GGDM(OBJ_ID varchar(255) primary key,DM varchar(255) null,DMMC varchar(255) null,DMLB varchar(255) null,DMLBMC varchar(255) null,BZ varchar(255) null,SFXS varchar(255) null)");
        db.execSQL("CREATE TABLE TestList(RWID varchar(255) primary key,RWMC varchar(255) null,JDJD varchar(255) null,ZYLX varchar(255) null,HDNR varchar(255) null,DZHXL varchar(255) null,DZHXLID varchar(255) null,HDSJ varchar(255) null)");
        db.execSQL("CREATE TABLE XZ_TABLE(ZJ_ID varchar(255) primary key,XZ_ID varchar(255) null,RWID varchar(255) null,XZMC varchar(255) null,XMSIZE varchar(255) null,YDSIZE varchar(255) null,HEGE varchar(255) null,BUHEGE varchar(255) null,BUSHEJI varchar(255) null,WEIJIANCHA varchar(255) null)");
        db.execSQL("CREATE TABLE GC_TABLE(GC_ID varchar(255) primary key,GCMC varchar(255) null,GCLX varchar(255) null,DYDJ varchar(255) null,GCXZ varchar(255) null)");
        db.execSQL("CREATE TABLE XM_TABLE(XM_ID varchar(255) primary key,XZID varchar(255) null,XMMC varchar(255) null,XMQZ varchar(255) null,JDYQ varchar(255) null,JDJD varchar(255) null)");
        db.execSQL("CREATE TABLE YD_TABLE(OBJ_ID varchar(255) primary key,YD_ID varchar(255) null,RWID varchar(255) null,XZID varchar(255) null,XMID varchar(255) null,YDMC varchar(255) null,WTMS varchar(255) null,JCJG varchar(255) null,PICTURE varchar(255) null,SBLX varchar(255) null,ISEND varchar(255) null)");
        db.execSQL("CREATE TABLE SB_TABLE(SB_ID varchar(255) primary key,GCID varchar(255) null,SBMC varchar(255) null,SBLX varchar(255) null,DYDJ varchar(255) null,SCCJ varchar(255) null,GCMC varchar(255) null)");
        //巡视记录
        db.execSQL("CREATE TABLE XSJL_TABLE(" +
                "OBJ_ID varchar(255) primary key," +
                "BDZMC varchar(255) null," +
                "XSRYMC varchar(255) null," +
                "XSKSSJ varchar(255) null," +
                "XSJSSJ varchar(255) null," +
                "XSLX varchar(255) null," +
                "XSJG varchar(255) null," +
                "RWID varchar(255) null," +
                "XSNR varchar(255) null)");
        //故障记录
        db.execSQL("CREATE TABLE GZJL_TABLE(" +
                "OBJ_ID varchar(255) primary key," +
                "RWID varchar(255) null," +
                "BDZMC varchar(255) null," +
                "GZXLMC varchar(255) null," +
                "DYDJ varchar(255) null," +
                "GZFSSJ varchar(255) null," +
                "GZLX varchar(255) null," +
                "SFTZ varchar(255) null," +
                "SFTY varchar(255) null," +
                "GZJT varchar(255) null," +
                "GZQK varchar(255) null)");

    }

    @Override
    public void onUpgrade(SQLiteDatabase sqLiteDatabase, int i, int i1) {

    }
}
